import React from "react";
import {Button, Grid} from "@material-ui/core";
import {AddRounded} from "@material-ui/icons";

import {EnhancedTable, Toolbar} from "../../../shared/components";

const ViewAllLaborCode = ({onAdd, onRowClick, ...props}) => {

    return (
        <Grid container spacing={4}>
            <Toolbar
                title="Labor Code"
                actions={<React.Fragment>
                    <Button variant="contained" color="primary" startIcon={<AddRounded/>} onClick={onAdd}>
                        Add Labor Code
                    </Button>
                </React.Fragment>}
            />

            <Grid item xs={12}>
                <EnhancedTable
                    title={"Labor Code List"}
                    schema={[
                        {id: 'id', label: 'Id', hidden: true},
                        {id: 'laborCode', label: 'Labor Code', sort: true},
                        {id: 'hourlyRate', label: 'Hourly Rate', sort: true},
                        {id: 'description', label: 'Description', sort: true}
                    ]}
                    data={[]}
                    onRowClick={onRowClick}
                />
            </Grid>
        </Grid>
    );
};

export default ViewAllLaborCode;
